<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>后台管理系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="../css/global.css?t=1488795362026" media="all">
<link rel="stylesheet" href="../css/layui.css?t=1488795362026"  >
<script src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../umeditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../umeditor/ueditor.all.js"> </script>
<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="../umeditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
		<div class="layui-header header header-demo">
				<div class="layui-main"> 
						<ul class="layui-nav" pc>
								<li class="right"> <span> 用户：jiadangwei</span><a href="/doc/" class="out">退出</a> </li>
						</ul>
				</div>
		</div>
		<div class="layui-side layui-bg-black">
				<div class="layui-side-scroll">
						
				</div>
		</div>
		<div class="layui-tab layui-tab-brief" lay-filter="demoTitle">
				<div class="layui-body layui-tab-content site-demo site-demo-body">
						<div class="mian">
								<form class="layui-form enen" action="../../up.php">
										<!--<div class="layui-form-item">
												<label class="layui-form-label">文章标题：</label>
												<div class="layui-input-block">
														<input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input" style="width:400px;">
												</div>
										</div>
										<div class="layui-form-item">
												<label class="layui-form-label">作者：</label>
												<div class="layui-input-block">
														<input type="text" name="title" required  lay-verify="required" placeholder="请输入作者" autocomplete="off" class="layui-input" style="width:200px">
												</div>
										</div>
										<div class="layui-form-item">
												<label class="layui-form-label">多张图片：</label>
												<div style="margin-left:110px;">
												   <div class="img btn_upload list_img" > 
												        <img src="images/tp/img_load.png">
														<div class="layui-input-block" style="opacity:0" >
																<input name="img_01" type="hidden" value="" class="_up_tb">
																<input type="file" name="file1" lay-type="file" class="layui-upload-file" style="width:263px; height:165px; " >
														</div>
												</div>
												<div class="img btn_upload list_img" > 
												        <img src="images/tp/img_load.png">
														<div class="layui-input-block" style="opacity:0" >
																<input name="img_01" type="hidden" value="" class="_up_tb">
																<input type="file" name="file1" lay-type="file" class="layui-upload-file" style="width:263px; height:165px; " >
														</div>
												</div>
												<div class="img btn_upload list_img" > 
												        <img src="images/tp/img_load.png">
														<div class="layui-input-block" style="opacity:0" >
																<input name="img_01" type="hidden" value="" class="_up_tb">
																<input type="file" name="file1" lay-type="file" class="layui-upload-file" style="width:263px; height:165px; " >
														</div>
												</div>
												<div class="img btn_upload list_img" > 
												        <img src="images/tp/img_load.png">
														<div class="layui-input-block" style="opacity:0" >
																<input name="img_01" type="hidden" value="" class="_up_tb">
																<input type="file" name="file1" lay-type="file" class="layui-upload-file" style="width:263px; height:165px; " >
														</div>
												</div>
												<div class="img btn_upload list_img" > 
												        <img src="images/tp/img_load.png">
														<div class="layui-input-block" style="opacity:0" >
																<input name="img_01" type="hidden" value="" class="_up_tb">
																<input type="file" name="file1" lay-type="file" class="layui-upload-file" style="width:263px; height:165px; " >
														</div>
												</div>
												</div>
												
										</div>
										<div class="layui-form-item">
												<label class="layui-form-label">单张图片：</label>
												<div style="margin-left:110px;">
													<div class="img btn_upload" > 
															<img src="images/tp/img_load.png">
															<div class="layui-input-block" style="opacity:0" >
																	<input name="img_2" type="hidden" value="" class="_up_bg">
																	<input type="file" name="file1" lay-type="file" class="layui-upload-file" style="width:263px; height:165px; " >
															</div>
													</div>
												</div>
										</div>
									
										<div class="layui-form-item layui-form-text">
												<label class="layui-form-label">内容:</label>
												<div class="layui-input-block">
											<script id="waitArticle" name="waitArticle" type="text/plain" style="width:100%;height:300px;">锁定锁定锁定锁定</script>

												</div>
										</div>
										<div class="layui-form-item layui-form-text">
												<label class="layui-form-label">内容:</label>
												<div class="layui-input-block">
											 <script id="liveData" name="liveData" type="text/plain" style="width:100%;height:300px;"></script>

												</div>
										</div>
										<div class="layui-form-item">
												<div class="layui-input-block">
														<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
														<button type="reset" class="layui-btn layui-btn-primary">重置</button>
												</div>
										</div>-->
			



								</form>
								类型：<input  value="" typeid>
								 文章id：<input  value="" selectid>

				
			</div>		
				</div>
		</div>
		<div class="layui-footer footer footer-demo">
				<div class="layui-main">
						<p>2017 &copy; <a href="/">layui.com</a> MIT license</p>
				</div>
		</div>
		<div class="site-tree-mobile layui-hide"> <i class="layui-icon">&#xe602;</i> </div>
		<div class="site-mobile-shade"></div>	
</div>
<!--弹出层-->	
  <div class="lay_select" style="display: none; z-index: 2000;">
  	  <div class="serch">
  	  	 <a class="close"><img src="../../images/close_btn.png"></a>
	  	  <form action="../json/ajax_list.php" method="post" class="layui-form enen" >
		  	  	  <div class="layui-input-inline" style=" width: 100px;">
		  	  		<select name="type" class="typeid" >
		  	  		<option value="0">全部</option>
		  	  		<option value="1">图文</option>
		  	  		<option value="2">视频</option>
		  	  		<option value="3">直播</option>
		  	  		<option value="4">系列</option>
		  	  		<option value="5">标准列表</option>
		  	  		<option value="6">机构</option>
		  	  		<option value="7">赛事</option>
		  	  		<option value="8">系列分类</option>
		  	  		<option value="9">评论</option>
		  	  		<option value="10">频道</option>
		  	  	</select>
		  	  	</div>
		  	    <div class="layui-input-inline">
		  	  		<input type="text" name="keyword" required  lay-verify="required" placeholder="请输入关键词" autocomplete="off" class="layui-input keyword" style="width:270px;">
		  	  	</div>
		  	  	<div class="layui-input-inline">
		  	  		 <a class="sear_btn layui-btn" href="javascript:;" />搜索</a>
		  	  	</div>
		  	  	<a  class="layui-btn layui-btn-danger" href="javascript:;" />确认</a>
	  	  	
	  	  </form>
  	  </div>
  	  <div class="conent">
  	  	    <ul class="list">
  	  	     
  	  	    </ul>
  	  </div>
  	  <div id="demo1"></div>
  </div>
<!--/弹出层-->		
<script src="../layui.js"></script> 
<script src="../js/fun.js"></script> 
<script>


//layAjax.ajax()
	
layAjax.init()
$(".btn_upload").each(function(index, element) {
	var btn=$(this).find("img");
	var file=$(this).find(".layui-upload-file");
	btn.click(function(){
		file.click();
		window.self=$(this)
	})
	layui.use('upload', function(){
	  layui.upload({
		url: 'json/upload.php'
		,elem: file //指定原始元素，默认直接查找class="layui-upload-file"
		,method: 'post' //上传接口的http类型
		,success: function(res){
			$(window.self).parents(".btn_upload").find("[type=hidden]").val(res.data.src)
			$(window.self).parents(".btn_upload").find("img").attr("src",res.data.src)
		}
	  });
	});
});
layui.use('form', function(){
  var form = layui.form();
  form.on('switch(switchTest)', function(data){
    layer.tips('开关checked：'+ (this.checked ? 'true' : 'false'), data.othis)
  });
  //监听提交
  form.on('submit(formDemo)', function(data){
    //layer.msg(JSON.stringify(data.field));
	$.ajax({
		url: "json/bm.php",
		data:data.field,
		type: "POST",
		dataType: "json",
		success: function(data) {
			layer.msg(data.resmsg);
		},
		error: function(er) {
			BackErr(er);
		}
	});
    return false;
  });
});
//var waitContent = UE.getEditor('waitArticle');
//var liveData = UE.getEditor('liveData');
</script>
</body>
</html>
